API Documentation
ContentLoader.h
1 // ContentLoader.h
3 //
5 
6 namespace nkScripts
7 {
11  class ContentLoader final
12  {
13  public :
14 
45  static bool outputData (const nkMemory::StringView& content, const nkMemory::StringView& path) ;
46 
54  static bool saveTreeDeclaration (nkExport::Node* tree, const nkMemory::StringView& pathFromData) ;
62  static bool saveObjectDeclaration (nkExport::Exportable* object, const nkMemory::StringView& pathFromData) ;
63 
71  static ContentLoadResultScript loadScriptDeclaration (const nkMemory::StringView& pathFromData, bool loadResource = true) ;
79  static ContentLoadResultScript processScriptSources (const nkMemory::StringView& sources, bool loadResource = true) ;
87  static ContentLoadResultScript processScriptTree (nkExport::Node* tree, bool loadResource = true) ;
88  } ;
89 }
nkScripts::ContentLoader::saveTreeDeclaration
static bool saveTreeDeclaration(nkExport::Node *tree, const nkMemory::StringView &pathFromData)
nkScripts
Encompasses all API of component NilkinsScripts.
Definition: Environment.h:7
nkExport::Exportable
An interface to define objects that can be exported using this component.
Definition: Exportable.h:15
nkScripts::ContentLoader::processScriptSources
static ContentLoadResultScript processScriptSources(const nkMemory::StringView &sources, bool loadResource=true)
nkScripts::ContentLoadResult
Holds information about a content load attempt.
Definition: ContentLoadResult.h:23
nkScripts::ContentLoader::inputDataStr
static nkMemory::String inputDataStr(const nkMemory::StringView &filePath)
nkScripts::ContentLoader::processScriptTree
static ContentLoadResultScript processScriptTree(nkExport::Node *tree, bool loadResource=true)
nkExport::ExporterLoadResult
Holds the information about a try to import data sources.
Definition: ExporterLoadResult.h:15
nkScripts::ContentLoader::outputData
static bool outputData(const nkMemory::StringView &content, const nkMemory::StringView &path)
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkScripts::ContentLoader
Allows to export and import content through their declaration files.
Definition: ContentLoader.h:12
nkMemory::String
Class holding information about a string, with ownership over the data.
Definition: String.h:22
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkScripts::ContentLoader::loadScriptDeclaration
static ContentLoadResultScript loadScriptDeclaration(const nkMemory::StringView &pathFromData, bool loadResource=true)
nkScripts::ContentLoader::inputDataSources
static nkExport::ExporterLoadResult inputDataSources(const nkMemory::StringView &sources)
nkScripts::ContentLoader::inputData
static nkExport::ExporterLoadResult inputData(const nkMemory::StringView &filePath)
nkScripts::ContentLoader::saveObjectDeclaration
static bool saveObjectDeclaration(nkExport::Exportable *object, const nkMemory::StringView &pathFromData)